package generics;

/**
 * @since Oct 13, 2017
 */
public class ArrayWithGenerics<T> {
    T[] array;

    @SuppressWarnings("unchecked")
    public ArrayWithGenerics(int size) {
        //[error]: Type parameter 'T' cannot be instantiated directly
        //[reason]: T may be Unversioned.Abstract Class
        //array = new T[size];

        array = (T[]) new Object[size];
    }
}
